const mongoose=require('./db.js')
let Type=new mongoose.Schema({
    name:String
})
const Typemodel=mongoose.model('type',Type)
const Yi=new mongoose.Schema({
    img:String,
    name:String,
    y_type:{
        type:mongoose.ObjectId,
        ref:'type'
    },
    price:Number,
    xiao:{
        type:Number,
        default:0
    },
    is_xin:{
        type:Boolean,
        default:true
    },
    color:{
        type:Object,
        default:['red','orange','blue']
    },
    size:{
        type:Object,
        default:['165/72A(S)','170/80A(M)','175/88A(L)','180/96A(XL)']
    }
})
const Yimodel=mongoose.model('yi',Yi)
let Search=new mongoose.Schema({
    name:String
})
const Searchmodel=mongoose.model('search',Search)
module.exports={Typemodel,Yimodel,Searchmodel}